using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;
using System.Data.Linq;
using System.ComponentModel;

namespace MRSite.Entity  
{  
	 [Table(Name = "product_category")] 
	 public class ProductCategory : Entity
	{ 
		/// <summary>
		///
		/// </summary>
		[Column(Name = "id", IsPrimaryKey = true, CanBeNull = false, IsVersion = true)]
		public override int id{ get; set; } 

		/// <summary>
		///标题
		/// </summary>
		[Column(Name = "title")]
		public String title{ get; set; } 

		/// <summary>
		///父节点ID
		/// </summary>
		[Column(Name = "parent_id")]
		public int parent_id{ get; set; } 

		/// <summary>
		///排序
		/// </summary>
		[Column(Name = "sort_id")]
		public int sort_id{ get; set; } 

		/// <summary>
		///等级
		/// </summary>
		[Column(Name = "level_id")]
		public int level_id{ get; set; } 

		/// <summary>
		///类别列表
		/// </summary>
		[Column(Name = "class_list")]
		public String class_list{ get; set; } 

		/// <summary>
		///外部链接
		/// </summary>
		[Column(Name = "link_url")]
		public String link_url{ get; set; } 

		/// <summary>
		///图片地址
		/// </summary>
		[Column(Name = "img_url")]
		public String img_url{ get; set; } 

		/// <summary>
		///内容
		/// </summary>
		[Column(Name = "contents")]
		public String contents{ get; set; } 

		/// <summary>
		///
		/// </summary>
		[Column(Name = "seo_title")]
		public String seo_title{ get; set; } 

		/// <summary>
		///
		/// </summary>
		[Column(Name = "seo_keywords")]
		public String seo_keywords{ get; set; } 

		/// <summary>
		///
		/// </summary>
		[Column(Name = "seo_description")]
		public String seo_description{ get; set; } 


		/// <summary>
        ///频道ID 0:自营商城；1：个人店；2：企业店；
		/// </summary>
		[Column(Name = "channel_id")]
		public int channel_id{ get; set; }

        /// <summary>
        /// 店铺id
        /// </summary>
        [Column(Name = "shopid"), DefaultValue(0)]
        public int shopid { get; set; }


        private EntitySet<Product> _productList;
        /// <summary>
        /// 文章
        /// </summary>
        [Association(Storage = "_productList", ThisKey = "id", OtherKey = "category_id")]
        public EntitySet<Product> ProductList
        {
            get { return this._productList; }
            set { this._productList.Assign(value); }
        }

        public ProductCategory()
        {
            this._productList = new EntitySet<Product>();
        }
	 } 
}    


